home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / HyperCard / DeskCover⁄ColorCover / DeskCover⁄ColorCover1.1 / DeskCover_ColorCover1.1 / cards.xml < prev    next >
Text File  |  1994-06-15  |  18KB  |  272 lines

  1. card_2991.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>2991</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_3694.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2572</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3149.css" />
  13.     <part>
  14.         <id>1</id>
  15.         <type>button</type>
  16.         <visible> <true /> </visible>
  17.         <reserved5> 0 </reserved5>
  18.         <reserved4> 0 </reserved4>
  19.         <reserved3> 0 </reserved3>
  20.         <reserved2> 0 </reserved2>
  21.         <reserved1> 0 </reserved1>
  22.         <enabled> <true /> </enabled>
  23.         <rect>
  24.             <left>84</left>
  25.             <top>78</top>
  26.             <right>201</right>
  27.             <bottom>100</bottom>
  28.         </rect>
  29.         <style>shadow</style>
  30.         <showName> <true /> </showName>
  31.         <highlight> <false /> </highlight>
  32.         <autoHighlight> <true /> </autoHighlight>
  33.         <sharedHighlight> <true /> </sharedHighlight>
  34.         <family>0</family>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>center</textAlign>
  38.         <font>Chicago</font>
  39.         <textSize>12</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <name>DeskCover on</name>
  42.         <script>on mouseUpglobal gColorCoverTrue,gDeskCoverTrueif gColorCoverTrue = "true" thenanswer "First uncover the Desktop by pushing the" && quote & "ColorCover off" & quote && "button."exit mouseUpend ifif gDeskCoverTrue = "true" thenanswer "First push the button" && quote & "DeskCover off." & quoteexit mouseUpend ifask "Choose a pattern: black, white, gray, darkGray, or lightGray."if it is empty thenexit mouseUpelseput "black,white,gray,darkGray,lightGray" into theListrepeat with i = 1 to the number of items in theListif it = item i of theList thenput "ok" into foundItDeskCover on,itif the result = empty thenput "true" into gDeskCoverTrueelseanswer the resultend ifexit repeatend ifend repeatif foundIt ‚↠"ok" thenanswer "Incorrect pattern name. Try again."end ifend ifend mouseUp</script>
  43.     </part>
  44.     <part>
  45.         <id>3</id>
  46.         <type>field</type>
  47.         <visible> <true /> </visible>
  48.         <dontWrap> <false /> </dontWrap>
  49.         <dontSearch> <false /> </dontSearch>
  50.         <sharedText> <false /> </sharedText>
  51.         <fixedLineHeight> <false /> </fixedLineHeight>
  52.         <autoTab> <false /> </autoTab>
  53.         <lockText> <true /> </lockText>
  54.         <rect>
  55.             <left>15</left>
  56.             <top>153</top>
  57.             <right>402</right>
  58.             <bottom>323</bottom>
  59.         </rect>
  60.         <style>scrolling</style>
  61.         <autoSelect> <false /> </autoSelect>
  62.         <showLines> <false /> </showLines>
  63.         <wideMargins> <false /> </wideMargins>
  64.         <multipleLines> <false /> </multipleLines>
  65.         <reservedFamily> 0 </reservedFamily>
  66.         <titleWidth>0</titleWidth>
  67.         <icon>0</icon>
  68.         <textAlign>left</textAlign>
  69.         <font>Geneva</font>
  70.         <textSize>12</textSize>
  71.         <textStyle>plain</textStyle>
  72.         <textHeight>16</textHeight>
  73.         <name>InfoFld</name>
  74.         <script></script>
  75.     </part>
  76.     <part>
  77.         <id>4</id>
  78.         <type>button</type>
  79.         <visible> <true /> </visible>
  80.         <reserved5> 0 </reserved5>
  81.         <reserved4> 0 </reserved4>
  82.         <reserved3> 0 </reserved3>
  83.         <reserved2> 0 </reserved2>
  84.         <reserved1> 0 </reserved1>
  85.         <enabled> <true /> </enabled>
  86.         <rect>
  87.             <left>22</left>
  88.             <top>113</top>
  89.             <right>138</right>
  90.             <bottom>136</bottom>
  91.         </rect>
  92.         <style>shadow</style>
  93.         <showName> <true /> </showName>
  94.         <highlight> <false /> </highlight>
  95.         <autoHighlight> <true /> </autoHighlight>
  96.         <sharedHighlight> <true /> </sharedHighlight>
  97.         <family>0</family>
  98.         <titleWidth>0</titleWidth>
  99.         <icon>0</icon>
  100.         <textAlign>center</textAlign>
  101.         <font>Chicago</font>
  102.         <textSize>12</textSize>
  103.         <textStyle>plain</textStyle>
  104.         <name>ColorCover on</name>
  105.         <script>on mouseUpglobal gColorCoverTrue,gDeskCoverTrueif gDeskCoverTrue = "true" thenanswer "First push the button" && quote & "DeskCover off." & quoteexit mouseUpend ifif gColorCoverTrue = "true" thenanswer "The Desktop is already Covered. First push the button" && quote & "ColorCover off." & quoteexit mouseUpend ifif gDeskCover ‚↠"true" thenColorCover onif the result is empty thenput "true" into gColorCoverTrueelseanswer the resultend ifelseanswer "The Desktop is already Covered"end ifend mouseUp</script>
  106.     </part>
  107.     <part>
  108.         <id>5</id>
  109.         <type>button</type>
  110.         <visible> <true /> </visible>
  111.         <reserved5> 0 </reserved5>
  112.         <reserved4> 0 </reserved4>
  113.         <reserved3> 0 </reserved3>
  114.         <reserved2> 0 </reserved2>
  115.         <reserved1> 0 </reserved1>
  116.         <enabled> <true /> </enabled>
  117.         <rect>
  118.             <left>143</left>
  119.             <top>113</top>
  120.             <right>259</right>
  121.             <bottom>136</bottom>
  122.         </rect>
  123.         <style>shadow</style>
  124.         <showName> <true /> </showName>
  125.         <highlight> <false /> </highlight>
  126.         <autoHighlight> <true /> </autoHighlight>
  127.         <sharedHighlight> <true /> </sharedHighlight>
  128.         <family>0</family>
  129.         <titleWidth>0</titleWidth>
  130.         <icon>0</icon>
  131.         <textAlign>center</textAlign>
  132.         <font>Chicago</font>
  133.         <textSize>12</textSize>
  134.         <textStyle>plain</textStyle>
  135.         <name>ColorCover off</name>
  136.         <script>on mouseUpglobal gColorCoverTrue,gDeskCoverTrueif gDeskCoverTrue = "true" thenanswer "Push the button" && quote & "DeskCover off" & quote && "instead."exit mouseUpend ifif gColorCoverTrue = "true" thenColorCover offput "false" into gColorCoverTrueend ifend mouseUp</script>
  137.     </part>
  138.     <part>
  139.         <id>6</id>
  140.         <type>button</type>
  141.         <visible> <true /> </visible>
  142.         <reserved5> 0 </reserved5>
  143.         <reserved4> 0 </reserved4>
  144.         <reserved3> 0 </reserved3>
  145.         <reserved2> 0 </reserved2>
  146.         <reserved1> 0 </reserved1>
  147.         <enabled> <true /> </enabled>
  148.         <rect>
  149.             <left>264</left>
  150.             <top>113</top>
  151.             <right>394</right>
  152.             <bottom>136</bottom>
  153.         </rect>
  154.         <style>shadow</style>
  155.         <showName> <true /> </showName>
  156.         <highlight> <false /> </highlight>
  157.         <autoHighlight> <true /> </autoHighlight>
  158.         <sharedHighlight> <true /> </sharedHighlight>
  159.         <family>0</family>
  160.         <titleWidth>0</titleWidth>
  161.         <icon>0</icon>
  162.         <textAlign>center</textAlign>
  163.         <font>Chicago</font>
  164.         <textSize>12</textSize>
  165.         <textStyle>plain</textStyle>
  166.         <name>ColorCover choose</name>
  167.         <script>on mouseUpglobal gColorCoverTrue,gDeskCoverTrueif gDeskCoverTrue = "true" thenanswer "First push the button" && quote & "DeskCover off." & quoteexit mouseUpend ifColorCover chooseif the result is empty thenput "true" into gColorCoverTrueelseanswer the resultend ifend mouseUp</script>
  168.     </part>
  169.     <part>
  170.         <id>7</id>
  171.         <type>button</type>
  172.         <visible> <true /> </visible>
  173.         <reserved5> 0 </reserved5>
  174.         <reserved4> 0 </reserved4>
  175.         <reserved3> 0 </reserved3>
  176.         <reserved2> 0 </reserved2>
  177.         <reserved1> 0 </reserved1>
  178.         <enabled> <true /> </enabled>
  179.         <rect>
  180.             <left>216</left>
  181.             <top>78</top>
  182.             <right>333</right>
  183.             <bottom>100</bottom>
  184.         </rect>
  185.         <style>shadow</style>
  186.         <showName> <true /> </showName>
  187.         <highlight> <false /> </highlight>
  188.         <autoHighlight> <true /> </autoHighlight>
  189.         <sharedHighlight> <true /> </sharedHighlight>
  190.         <family>0</family>
  191.         <titleWidth>0</titleWidth>
  192.         <icon>0</icon>
  193.         <textAlign>center</textAlign>
  194.         <font>Chicago</font>
  195.         <textSize>12</textSize>
  196.         <textStyle>plain</textStyle>
  197.         <name>DeskCover off</name>
  198.         <script>on mouseUpglobal gColorCoverTrue,gDeskCoverTrueif gColorCoverTrue = "true" thenanswer "Push the" && quote & "ColorCover off" & quote && "button instead."exit mouseUpend ifif gDeskCoverTrue = "true" thenDeskCover offput "false" into gDeskCoverTrueend ifend mouseUp</script>
  199.     </part>
  200.     <part>
  201.         <id>8</id>
  202.         <type>button</type>
  203.         <visible> <true /> </visible>
  204.         <reserved5> 0 </reserved5>
  205.         <reserved4> 0 </reserved4>
  206.         <reserved3> 0 </reserved3>
  207.         <reserved2> 0 </reserved2>
  208.         <reserved1> 0 </reserved1>
  209.         <enabled> <true /> </enabled>
  210.         <rect>
  211.             <left>45</left>
  212.             <top>40</top>
  213.             <right>114</right>
  214.             <bottom>57</bottom>
  215.         </rect>
  216.         <style>shadow</style>
  217.         <showName> <true /> </showName>
  218.         <highlight> <false /> </highlight>
  219.         <autoHighlight> <true /> </autoHighlight>
  220.         <sharedHighlight> <true /> </sharedHighlight>
  221.         <family>0</family>
  222.         <titleWidth>0</titleWidth>
  223.         <icon>0</icon>
  224.         <textAlign>center</textAlign>
  225.         <font>Chicago</font>
  226.         <textSize>12</textSize>
  227.         <textStyle>plain</textStyle>
  228.         <name>HideBars</name>
  229.         <script>on mouseUphide menubarhide titlebarput the screenRect into screenSizeput ((item 3 of screenSize)-(the width of the card window)) div 2 into cardTopLeftput "," & (((item 4 of screenSize)-(the height of the card window)) div 2) after cardTopLeftset the loc of the card window to cardTopLeftend mouseUp</script>
  230.     </part>
  231.     <part>
  232.         <id>9</id>
  233.         <type>button</type>
  234.         <visible> <true /> </visible>
  235.         <reserved5> 0 </reserved5>
  236.         <reserved4> 0 </reserved4>
  237.         <reserved3> 0 </reserved3>
  238.         <reserved2> 0 </reserved2>
  239.         <reserved1> 0 </reserved1>
  240.         <enabled> <true /> </enabled>
  241.         <rect>
  242.             <left>297</left>
  243.             <top>40</top>
  244.             <right>368</right>
  245.             <bottom>57</bottom>
  246.         </rect>
  247.         <style>shadow</style>
  248.         <showName> <true /> </showName>
  249.         <highlight> <false /> </highlight>
  250.         <autoHighlight> <true /> </autoHighlight>
  251.         <sharedHighlight> <true /> </sharedHighlight>
  252.         <family>0</family>
  253.         <titleWidth>0</titleWidth>
  254.         <icon>0</icon>
  255.         <textAlign>center</textAlign>
  256.         <font>Chicago</font>
  257.         <textSize>12</textSize>
  258.         <textStyle>plain</textStyle>
  259.         <name>ShowBars</name>
  260.         <script>on mouseUpshow menubarshow titlebarend mouseUp</script>
  261.     </part>
  262.     <content>
  263.         <layer>card</layer>
  264.         <id>3</id>
  265.         <text><span class="style5">eskCover1.1 & ColorCover1.1</span><span class="style6">To see some of the effects possible with DeskCover  and ColorCover, push the "ColorCover on" button, and then push the "HideBars" button. You can use the "ShowBars" button to make the menu bar and window title bar visible again. Try the "DeskCover on" and "ColorCover choose" buttons. The scripts that these buttons trigger are explained below. Experiment!!</span><span class="style7">"DeskCover" and "ColorCover" are shareware.  A $10 fee entitles you to use both of these XCMDs in any number of freeware or shareware projects. A $25 fee entitles you to use the XCMDs in any number of custom applications that you make for any of your clients. If you intend to use either of these XCMDs in an application that will be sold on a retail basis, contact the author at  MKlink@aol.com to negotiate a fee.In all cases, you must include with your application this legend:  the title of the XCMD used, either  "DeskCover" or  "ColorCover," and, "¬©1994 Mark A. Klink. All rights reserved.  Contact:MKlink@aol.com." An "about box" or the documentation accompanying your application would be appropriate locations.</span><span class="style6">To register, send your name, address, and fee to:                                       Mark Klink                                       6225 PattyPeart Way                                       Carmichael, CA 95608</span><span class="style7">Registering your copy of "DeskCover 1.1"  and "ColorCover 1.1" now will entitle you to use all future  shareware versions without additional fees.</span><span class="style6">-------------------------------------------------- "DeskCover" and "ColorCover" are XCMDs that can cover the desktop while a HyperCard stack in which they are installed  is running. This prevents the user from activating the desktop or other applications by  clicking outside of the HyperCard window. The backdrop automatically expands to cover the desktop on any size monitor."DeskCover" provides a choice of black, white, gray, light gray, or dark gray backgrounds. It operates on all systems that can use HyperCard 2.0 and above, or the HyperCard Player. In addition to those requirements, "ColorCover" requires 32 bit Color QuickDraw for full use of its features. It allows the stack author to select any color for a backdrop. On Macs without Color QuickDraw, "ColorCover" will revert to a black backdrop. You will also need ResEdit, Resource Mover, or some other resource moving utility to install the XCMDs into your own stacks."DeskCover" or "ColorCover" would normally be called from an "on openStack" or an "on startUp" handler. However, either XCMD can be called from anywhere within your scripts.</span><span class="style5">DeskCover</span><span class="style6">"DeskCover" takes three parameters:DeskCover cover, thePattern, menuActionThe first parameter,"cover", can be either "on" or "off". If it is "on", DeskCover will cover the desktop. If it is "off", the desktop will be uncovered. The second parameter, thePattern, can take any of the following values: "black","white","gray", "lightGray", or "darkGray". Typical scripts might read:on openStack  DeskCover on, lightGray  if the result is not empty then     < Do something else! DeskCover failed!>  end ifend openStackon closeStack  DeskCover offend closeStackThe third parameter, menuAction, is optional. The only value that this parameter takes is "off". "DeskCover" and "ColorCover" work by creating  an external window the size of the current screen. This external window sits behind the card window and cannot be brought to the front by mouse clicks. However, the external window could be manipulated by using the "Next Window" menuItem of the standard "Go" menu. If the user chooses the "Next Window" menuItem, HyperCard will cycle through the windows, putting the backdrop on top and covering the card window! "DeskCover" and "ColorCover" will automatically delete the "NextWindow" menuItem when they cover the desktop. If the "Go" menu has not been changed at the point where the "Next Window" menu item should be inserted,  they will automatically restore the menuItem when they uncover the desktop. There may be circumstances where you will want to override this action. Calls  to "DeskCover" using this option might look like this:DeskCover on, gray, offDeskCover off , , off</span><span class="style5">ColorCover</span><span class="style6">"ColorCover" takes two parameters:ColorCover theChoice, menuAction"theChoice" can take three different values. If "theChoice" is given the value "on", the desktop will be covered. If it is given the value "off" the desktop will be uncovered. If "theChoice" is given the value "choose," the standard Apple Color Picker will appear, allowing the stack author to choose a new color for the background. Whatever color is chosen will be stored as a small TEXT resource so that the next time the stack is opened and "ColorCover" is called, the background will be painted with the same color. You would normally use the "choose" option from the message box while you are developing your stack. Typical scripts might read:on openStack  ColorCover on  if the result is not empty then     < Do something else! ColorCover failed!>   end ifend openStackon closeStack  ColorCover offend closeStackTo choose a new color, type this in the message box:ColorCover chooseAs explained in the "DeskCover" section, you can override the default actions to remove and restore the "Next Window" menuItem by giving the optional menuAction parameter the value "off". Your calls to "ColorCover" might read:ColorCover on, offColorCover off, off</span><span class="style5">Special Considerations:</span><span class="style6">"DeskCover" and "ColorCover" require HyperCard 2.0 and above, or the HyperCard Player.ResEdit, Resource Mover, or some other resource moving utility must be used to copy the "DeskCover" or "ColorCover" XCMD into your stack. You do not need to copy the TEXT resource that "ColorCover" uses to keep a record of the last backdrop color that was chosen. "ColorCover" will create the resource if it is not already present.Unless you use the commands "DeskCover off" or "ColorCover off" the desktop will remain covered if you switch stacks within the same HyperCard session.While either "DeskCover" or "ColorCover" is enabled, you will get a "resources are in use" error if you try to compact your stack. If you have a handler that automatically compacts your stack, be sure to first call either "DeskCover off" or "ColorCover off."Generally, the best approach is to invoke "DeskCover" or "ColorCover" before opening any windows other than the card window of the stack that contains the XCMD.See the accompanying ReadMe file for additional information. </span><span class="style9">Centering the card window and hiding the menubar and titlebar</span><span class="style6">In many instances you will want to hide the menubar and the titlebar of the HyperCard Window and position the window at the center of the screen. This can be done easily using these lines:   hide menubar   hide titlebar   put the screenRect into screenSize   put ((item 3 of screenSize)-(the width of the card window)) div 2 into cardTopLeft   put "," & (((item 4 of screenSize)-(the height of the card window))div 2) after cardTopLeft   set the loc of the card window to cardTopLeftBy placing these lines in an "on startUp" handler, all of the changes to the card window will take place before the card window is shown. </span><span class="style5">Legal Stuff:</span><span class="style6"></span><span class="style7">The author makes no warranty or representation, either express or implied with respect to this software, its quality, performance, merchantability or fitness for a particular purpose. This software is made available "as is". You, as the user, assume the entire risk as to its quality and performance. In no event will the author be liable for direct, indirect, special, incidental, or consequential damages resulting from any defect in the software or documentation, even if advised of the possibility of such damages."DeskCover1.1" and "ColorCover1.1" XCMDs ¬©1994 Mark A. Klink. All rights reserved.</span><span class="style6"></span><span class="style5">Epilogue:</span><span class="style6">This XCMD was written using </span><span class="style7">CompileIt! </span><span class="style6">, a product (and trademark) of Heizer Software. </span><span class="style7">CompileIt!</span><span class="style6">  is a wonderful tool.</span></text>
  266.     </content>
  267.     <name></name>
  268.     <script></script>
  269. </card>
  270.  
  271.  
  272.